import request from '@/utils/request'

// 获取所有资金渠道
export function listCapitalChannel(pageNum,pageSize) {
  return request({
    url: '/channel/listCapitalChannel?pageNum='+pageNum+'&pageSize='+pageSize,
    method: 'get'
  })
}


// 复合查询
export function searchCapitalChannel(data) {
  return request({
      url: '/channel/searchCapitalChannel',
      method: 'get',
      params: data
    })
}

// 新增渠道
export function addCapitalChannel(data) {
  return request({
      url: '/channel/addCapitalChannel',
      method: 'post',
      data
    })
}

// 查询当前用户信息
export function findCurrentUser(data) {
  return request({
      url: '/channel/findCurrentUser/'+data,
      method: 'get'
    })
}

// 更新当前渠道状态
export function updateChannelStatus(data) {
  return request({
      url: '/channel/updateChannelStatus/'+data,
      method: 'get'
    })
}


// 查询当前渠道信息
export function checkChannelInfo(data) {
  return request({
      url: '/channel/checkChannelInfo/'+data,
      method: 'get'
    })
}


// 更新当前渠道信息
export function updateCapitalChannel(data) {
  return request({
      url: '/channel/updateCapitalChannel',
      method: 'post',
      data
    })
}


// 查询所有用户信息
export function getAllUserInfo() {
  return request({
      url: '/channel/getAllUserInfo',
      method: 'get'
    })
}